package com.fancy.recommendation.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户偏好表实体
 *
 * @author fancy
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_user_preference")
public class UserPreference {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 偏好类型
     */
    @TableField("preference_type")
    private String preferenceType;

    /**
     * 偏好值
     */
    @TableField("preference_value")
    private String preferenceValue;

    /**
     * 权重
     */
    @TableField("weight")
    private BigDecimal weight;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
